package cn.iocoder.yudao.module.reading.controller.app.punch.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 用户阅读统计响应 VO
 *
 * @author 李晨
 */
@Schema(description = "用户阅读统计响应 VO")
@Data
public class UserStatsRespVO {

    @Schema(description = "总打卡天数", requiredMode = Schema.RequiredMode.REQUIRED, example = "30")
    private Integer totalPunchDays;

    @Schema(description = "连续打卡天数", requiredMode = Schema.RequiredMode.REQUIRED, example = "7")
    private Integer consecutiveDays;

    @Schema(description = "最长连续打卡天数", requiredMode = Schema.RequiredMode.REQUIRED, example = "15")
    private Integer maxConsecutiveDays;

    @Schema(description = "本月打卡天数", requiredMode = Schema.RequiredMode.REQUIRED, example = "12")
    private Integer thisMonthPunchDays;

    @Schema(description = "总阅读时长（分钟）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1200")
    private Integer totalReadingTime;

    @Schema(description = "总阅读绘本数", requiredMode = Schema.RequiredMode.REQUIRED, example = "50")
    private Integer totalBooksRead;

    @Schema(description = "平均阅读时长（分钟）", example = "24")
    private Integer averageReadingTime;

    @Schema(description = "打卡率", example = "0.85")
    private Double punchRate;

    @Schema(description = "月度统计")
    private List<MonthlyStatsVO> monthlyStats;

    @Schema(description = "周统计")
    private List<WeeklyStatsVO> weeklyStats;

    @Schema(description = "月度统计")
    @Data
    public static class MonthlyStatsVO {
        @Schema(description = "月份", example = "2024-01")
        private String month;

        @Schema(description = "打卡天数", example = "15")
        private Integer punchDays;

        @Schema(description = "阅读时长（分钟）", example = "360")
        private Integer readingTime;

        @Schema(description = "绘本数量", example = "25")
        private Integer bookCount;
    }

    @Schema(description = "周统计")
    @Data
    public static class WeeklyStatsVO {
        @Schema(description = "周", example = "2024-W01")
        private String week;

        @Schema(description = "打卡天数", example = "5")
        private Integer punchDays;

        @Schema(description = "阅读时长（分钟）", example = "120")
        private Integer readingTime;

        @Schema(description = "绘本数量", example = "8")
        private Integer bookCount;
    }

}
